<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--顶部导航栏,利用th:fragment提取出来,命名为topbar-->
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0" th:fragment="topbar">
    <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="http://getbootstrap.com/docs/4.0/examples/dashboard/#">[[${session.loginUser}]]</a>
    <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
    <ul class="navbar-nav px-3">
        <li class="nav-item text-nowrap">
            <a class="nav-link" th:href="@{/user/logout}">log out</a>
        </li>
    </ul>
</nav>
<!--侧边栏,利用th:fragment提取出来,命名为sidebar-->
<nav class="col-md-2 d-none d-md-block bg-light sidebar" th:fragment="siderbar">
    <div class="menu">
        <a href="/classData.html"><div class="menuItem uno">学院数据</div></a>
        <a th:if="${identity} eq 'student'" href="/courses"><div class="menuItem dos">我的班级</div></a>
        <a th:if="${identity} eq 'teacher'" href="/courses"><div class="menuItem dos">学生管理</div></a>
        <a href="/personCenter"><div class="menuItem tres">个人中心</div></a>
        <a href="/News"><div class="menuItem cuatro">最新通知</div></a>
        <a th:if="${identity} eq 'student'" th:href="@{/stu/privateUpdate/{num}(num=${user})}"><div class="menuItem cinco">设置</div></a>
        <a th:if="${identity} eq 'teacher'" th:href="@{/teacher/privateUpdate/{num}(num=${user})}"><div class="menuItem cinco">设置</div></a>
    </div>
</nav>
</html>